import constants from '../constants/index';

const {
    GET_REVIEW_INFO_SUCCESS,
    GET_RESULT_SCR_SUCCESS,
    GET_PDF_SUCCESS
} = constants;

export default (state = {}, action) => {
    switch (action.type) {
        case GET_REVIEW_INFO_SUCCESS:
            return {
                ...state,
                list:action.data,
                infoTotal:action. total
            };
        case GET_RESULT_SCR_SUCCESS:
            return {
                ...state,
                resultList:action.data
            };
        case GET_PDF_SUCCESS:
            return {
                ...state,
                pdfFile:action.data
            };
        default:
            return state;
    }
};
